<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>致家装修</title>
    <style>
        html{
            background: #d8dfcb;
        }
        header,footer{
            background-color: #07be8b;
            font-size: 20px;
            color: #fff;
            text-align: center;
            padding: 8px 0;
        }
        content{
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }
        .divx{
            box-sizing: border-box;
            width: 49%;
            padding: 4px;
            height: 195px;
        }
        img{
            width: 100%;
            height: 80%;
        }
        p{
            margin: 0;
            padding: 0;
        }
        .text{
            color: red;
        }
        body{
            background-color: #bde7b2;
        }
        .div{
            text-align: center;
            margin-top: 23px;
            width: 260px;
            margin: auto;
        }
        .img{
            width: 100%;
            height: 70%;
        }
        #yy{
            display: none;
        }
    </style>
</head>
<body>
    <header>致 家 装 修</header>
    <div id="xx">
    <content>
        <div class="divx">
            <img src="./one.jpg" alt="">
            <p>价格:<span class="text">￥73</span> 片</p>
        </div>
        <div class="divx">
            <img src="./two.jpg" alt="">
            <p>价格:<span class="text">￥83</span> 片</p>
        </div>
        <div class="divx">
            <img src="./three.jpg" alt="">
            <p>价格:<span class="text">￥63</span> 片</p>
        </div>
        <div class="divx">
            <img src="./four.jpg" alt="">
            <p>价格:<span class="text">￥123</span> 片</p>
        </div>
        <div class="divx">
            <img src="./fire.jpg" alt="">
            <p>价格:<span class="text">￥199</span> 片</p>
        </div>
        <div class="divx">
            <img src="./six.png" alt="">
            <p>价格:<span class="text">￥45</span> 片</p>
        </div>
    </content>
    <footer>
        <div onclick="go()">联 系 方 式</div>
    </footer>
</div>
<div id="yy">
    <div style="padding: 10px;">
        <div class="div">
            微信
            <img src="./er.png" alt="" class="img">
        </div>
        <div class="div">
            QQ
            <img src="./er.png" alt="" class="img">
        </div>
        <div class="div" style="font-size:20px;margin-top:24px;">电话号码:18477468950</div>
        <footer class="div" style="font-size:20px;margin-top:20px;" onclick="back()">返 回</footer>
    </div> 
</div>
<script>
    function back () {
        var f = document.getElementById('yy')
        f.style.display = 'none'
        var t = document.getElementById('xx')
        t.style.display = 'block'
    }
    function go () {
        var f = document.getElementById('xx')
        f.style.display = 'none'
        var t = document.getElementById('yy')
        t.style.display = 'block'
    }
</script>
</body>
</html>